import React from 'react';

function CustomTextInput(props) {
    return (
        <div>
            <input ref={props.inputRef}/>
        </div>
    );
}

export class Parent extends React.Component {

    componentDidMount() {
        this.inputElement.value=333
    }
    render() {
        return (
            <CustomTextInput
                inputRef={el => this.inputElement = el}
            />
        );
    }
}